<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>情书 - Love Letter</title>
    <link rel="stylesheet" href="/css/style.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            height: 100vh;
            overflow: hidden;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            font-family: 'Microsoft YaHei', sans-serif;
        }

        .game-container {
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .game-header {
            padding: 15px 20px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            text-align: center;
            color: white;
            flex-shrink: 0;
        }

        .game-header h1 {
            font-size: 24px;
            font-weight: 600;
        }

        /* 游戏桌面区域 */
        .game-table {
            flex: 1;
            position: relative;
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 0;
        }

        /* 玩家卡牌区域 */
        .players-board {
            width: 100%;
            height: 100%;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* 牌堆容器 */
        .deck-container {
            position: absolute;
            bottom: 20px;
            left: 20px;
            z-index: 1;
            pointer-events: none;
        }

        .discard-container {
            position: absolute;
            bottom: 20px;
            right: 20px;
            z-index: 1;
            pointer-events: none;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .discard-label {
            color: rgba(255, 255, 255, 0.85);
            font-size: 16px;
            font-weight: 600;
            text-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
            pointer-events: none;
        }

        .discard-arrow {
            position: absolute;
            bottom: 160px;
            left: 50%;
            transform: translate(-50%, 0);
            font-size: 32px;
            color: #ffd700;
            opacity: 0;
            pointer-events: none;
            text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
            animation: discardArrowBounce 1.2s ease-in-out infinite;
        }

        .discard-arrow.visible {
            opacity: 1;
        }

        @keyframes discardArrowBounce {
            0%, 100% {
                transform: translate(-50%, 0);
            }
            50% {
                transform: translate(-50%, -12px);
            }
        }

        /* 牌堆 */
        .deck {
            width: 100px;
            height: 140px;
            background-image: url('/images/loveLetter/back.png');
            background-size: cover;
            background-position: center;
            border: 3px solid #ffd700;
            border-radius: 10px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
            position: relative;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            padding-bottom: 10px;
        }

        .deck-container.clickable {
            pointer-events: auto;
        }

        .deck.clickable {
            cursor: pointer;
        }

        .discard {
            width: 100px;
            height: 140px;
            border: 3px solid rgba(255, 255, 255, 0.5);
            border-radius: 10px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, rgba(20, 20, 30, 0.9) 0%, rgba(40, 40, 55, 0.9) 100%);
        }

        .discard-container.clickable {
            pointer-events: auto;
        }

        .discard.clickable {
            cursor: pointer;
        }

        .discard.clickable.playable {
            border-color: #ffd700;
            box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
        }

        .deck::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
            border-radius: 7px;
        }

        .deck-count {
            position: relative;
            z-index: 1;
            color: #ffd700;
            font-size: 14px;
            font-weight: bold;
            text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
            text-align: center;
            line-height: 1.3;
        }


        .discard-card-face {
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center;
            position: relative;
            filter: grayscale(1);
            display: flex;
            align-items: flex-end;
            justify-content: center;
            border-radius: 8px;
            overflow: hidden;
            text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
        }

        .discard-card-face .card-overlay {
            padding: 8px 6px 12px;
        }

        .discard-card-face .card-overlay .card-name {
            font-size: 14px;
        }

        .discard-card-face .card-overlay .card-description {
            display: none;
        }

        .discard-empty {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.7);
            text-align: center;
            line-height: 1.4;
        }

        .deck-arrow {
            position: absolute;
            bottom: 160px;
            left: 50%;
            transform: translate(-50%, 0);
            font-size: 32px;
            color: #ffd700;
            opacity: 0;
            pointer-events: none;
            text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
            animation: deckArrowBounce 1.2s ease-in-out infinite;
        }

        .deck-arrow.visible {
            opacity: 1;
        }

        @keyframes deckArrowBounce {
            0%, 100% {
                transform: translate(-50%, 0);
            }
            50% {
                transform: translate(-50%, -12px);
            }
        }

        /* 动画卡牌 */
        .flying-card {
            position: absolute;
            width: 140px;
            height: 196px;
            background-size: cover;
            background-position: center;
            border: 3px solid #333;
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
            z-index: 1000;
            overflow: hidden;
            pointer-events: none;
            transition: none;
            color: white;
            text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
        }

        .flying-card:not(.discard).animate {
            animation: flyToHand var(--card-draw-animation-duration, 1.0s) ease-in-out forwards;
        }

        .flying-card.opponent-draw.animate {
            animation: flyToOpponent var(--card-draw-animation-duration, 1.0s) ease-in-out forwards;
        }

        .flying-card.discard {
            filter: grayscale(1);
        }

        .flying-card.discard.animate {
            animation: flyToDiscard var(--card-draw-animation-duration, 1.0s) ease-in-out forwards;
        }

        @keyframes flyToHand {
            0% {
                transform: translate(-50%, -50%) scale(var(--initial-scale, 0.714)) rotate(0deg);
            }
            /* 50% {
                transform: translate(calc(-50% + var(--target-x)), calc(-50% + var(--target-y))) scale(0.8) rotate(180deg);
            } */
            100% {
                transform: translate(calc(-50% + var(--target-x)), calc(-50% + var(--target-y))) scale(1) rotate(360deg);
            }
        }

        @keyframes flyToDiscard {
            0% {
                transform: translate(-50%, -50%) scale(var(--initial-scale, 1)) rotate(0deg);
                opacity: 1;
            }
            50% {
                transform: translate(calc(-50% + var(--target-x)), calc(-50% + var(--target-y))) scale(calc((var(--initial-scale, 1) + var(--target-scale, 0.7)) / 2)) rotate(-180deg);
                opacity: 0.85;
            }
            100% {
                transform: translate(calc(-50% + var(--target-x)), calc(-50% + var(--target-y))) scale(var(--target-scale, 0.7)) rotate(-360deg);
                opacity: 0;
            }
        }

        @keyframes flyToOpponent {
            0% {
                transform: translate(-50%, -50%) scale(var(--initial-scale, 1)) rotate(0deg);
            }
            100% {
                transform: translate(calc(-50% + var(--target-x)), calc(-50% + var(--target-y))) scale(var(--target-scale, 1)) rotate(360deg);
            }
        }

        /* 玩家卡牌容器 */
        .player-card-slot {
            position: absolute;
            display: flex;
            flex-direction: column;
            align-items: center;
            transition: all 0.3s ease;
        }

        .player-card-slot.self {
            position: relative;
            z-index: 10;
        }

        .player-card-slot.other {
            z-index: 5;
        }


        .player-card-slot.selectable {
            cursor: pointer;
            animation: pulse-glow 2s ease-in-out infinite;
        }

        .player-card-slot.selectable .opponent-card {
            border: 3px solid #ffd700;
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
            cursor: pointer;
        }

        .player-card-slot.selectable:hover .opponent-card {
            transform: translateY(-10px) scale(1.1);
            box-shadow: 0 10px 30px rgba(255, 215, 0, 0.8);
        }

        .player-card-slot.selectable .player-name {
            color: #ffd700;
            font-weight: 700;
            text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
        }

        .player-card-slot.selectable:hover .player-name {
            color: #ffed4e;
        }

        @keyframes pulse-glow {
            0%, 100% {
                transform: translate(-50%, -50%) scale(1);
            }
            50% {
                transform: translate(-50%, -50%) scale(1.02);
            }
        }

        /* 玩家名称 */
        .player-name {
            color: white;
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
            transition: color 0.3s ease;
        }

        .player-card-slot.current .player-name {
            color: #ffd700;
            text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
        }

        .player-card-slot.protected .player-name::after {
            content: ' 🛡️';
        }

        /* 自己的卡牌 */
        .my-cards-container {
            display: flex;
            gap: 12px;
            align-items: center;
            justify-content: center;
        }

        .my-card {
            width: 140px;
            height: 196px;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            border-radius: 10px;
            color: white;
            position: relative;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
            transition: all 0.3s ease;
            cursor: default;
            flex-shrink: 0;
            overflow: hidden;
            border: 2px solid rgba(255, 255, 255, 0.15);
            text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
        }

        .my-card.playable {
            cursor: pointer;
        }

        .my-card.playable:hover {
            transform: translateY(-8px) scale(1.05);
            box-shadow: 0 10px 28px rgba(102, 126, 234, 0.6);
        }

        .my-card.selected {
            border: 3px solid #ffd700;
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
            transform: translateY(-5px);
            opacity: 0.7; /* 选中时稍微透明，表示已选中但还没打出 */
        }

        .my-card.played {
            opacity: 0.4; /* 已打出后更透明 */
            pointer-events: none;
        }

        .my-card.hidden {
            opacity: 0;
            pointer-events: none;
        }

        /* 出局玩家的自己的卡牌显示（黑白化，类似弃牌堆） */
        .my-card.eliminated {
            filter: grayscale(1);
            pointer-events: none; /* 出局后不可点击 */
        }

        .my-card.eliminated .card-overlay {
            background: rgba(0, 0, 0, 0.2);
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            align-items: center;
            padding: 8px 6px 12px;
        }

        .my-card.eliminated .card-description {
            display: none; /* 和弃牌堆一样，不显示描述 */
        }

        .play-card-button {
            width: 140px;
            height: 45px;
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
            margin-top: 15px;
        }

        .play-card-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(255, 107, 107, 0.6);
        }

        .play-card-button:active {
            transform: translateY(0);
        }


        .card-overlay {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            padding: 12px 10px 14px;
            background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.85) 100%);
            display: flex;
            flex-direction: column;
            gap: 6px;
            pointer-events: none;
        }

        .card-overlay .card-name {
            font-size: 16px;
            font-weight: 700;
            text-align: center;
        }

        .card-overlay .card-description {
            font-size: 11px;
            text-align: center;
            line-height: 1.4;
            opacity: 0.95;
        }

        .card-preview {
            position: relative;
            width: 100%;
            aspect-ratio: 140 / 196;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            border-radius: 12px;
            overflow: hidden;
            color: white;
            text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
        }

        /* 对手卡牌容器 */
        .opponent-cards-container {
            position: relative;
            width: 130px; /* 足够容纳两张重叠的卡牌：100px + 15px偏移 */
            height: 140px;
            display: flex;
            align-items: center;
            justify-content: flex-start;
        }

        /* 对手卡牌堆叠容器 */
        .opponent-card-stack {
            position: absolute;
            top: 0;
            left: 0;
        }

        /* 对手卡牌（背面） */
        .opponent-card {
            width: 100px;
            height: 140px;
            background-image: url('/images/loveLetter/back.png');
            background-size: contain;
            background-position: center;
            background-repeat: no-repeat;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            border: 2px solid transparent; /* 默认透明，高亮时显示黄色 */
            background-color: transparent; /* 确保背景透明 */
        }

        .opponent-card.out::after {
            content: '❌';
            position: absolute;
            font-size: 32px;
            background: rgba(0, 0, 0, 0.7);
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
        }

        /* 出局玩家的卡牌显示（黑白化，类似弃牌堆） */
        .opponent-card.eliminated {
            filter: grayscale(1);
            background-size: cover;
            background-position: center;
            width: 100px;
            height: 140px;
        }

        .opponent-card.eliminated::after {
            display: none; /* 不显示❌，因为已经显示卡牌内容了 */
        }

        .opponent-card.eliminated .card-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.2);
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            align-items: center;
            padding: 8px 6px 12px;
            box-sizing: border-box;
            color: white;
            text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
        }

        .opponent-card.eliminated .card-name {
            font-size: 14px;
            font-weight: bold;
            margin-bottom: 0;
        }

        .opponent-card.eliminated .card-description {
            display: none; /* 和弃牌堆一样，不显示描述 */
        }

        /* 出局卡牌包装器 */
        .opponent-card-wrapper,
        .my-card-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
        }

        /* 出局标记叠加层 */
        .opponent-card-wrapper .out-overlay,
        .my-card-wrapper .out-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('/images/loveLetter/out.png');
            background-size: contain; /* 保持原大小，不拉伸 */
            background-position: center;
            background-repeat: no-repeat;
            pointer-events: none;
            z-index: 10;
            /* 不受父元素黑白化影响，因为它在卡牌外部 */
        }


        /* 消息区域 */
        #game-message {
            position: absolute;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(255, 255, 255, 0.95);
            padding: 12px 24px;
            border-radius: 25px;
            font-size: 16px;
            font-weight: 600;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            z-index: 20;
            max-width: 80%;
            text-align: center;
        }

        .message.error {
            background: rgba(244, 67, 54, 0.95);
            color: white;
        }

        /* 游戏日志区域 */
        .game-log-section {
            height: 200px;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-top: 2px solid rgba(102, 126, 234, 0.3);
            display: flex;
            flex-direction: column;
            flex-shrink: 0;
        }

        .log-header {
            padding: 10px 20px;
            background: rgba(102, 126, 234, 0.1);
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            font-weight: 600;
            color: #333;
        }

        #game-log {
            flex: 1;
            overflow-y: auto;
            padding: 10px 20px;
            font-size: 13px;
            display: flex;
            flex-direction: column-reverse;
        }

        .log-empty {
            color: #999;
            font-style: italic;
            text-align: center;
            padding: 20px;
        }

        .log-entry {
            padding: 6px 8px;
            margin-bottom: 4px;
            border-radius: 4px;
            display: flex;
            gap: 8px;
            align-items: flex-start;
            line-height: 1.4;
            animation: logEntryFadeIn 0.3s ease;
        }

        @keyframes logEntryFadeIn {
            from {
                opacity: 0;
                transform: translateY(-5px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .log-time {
            color: #999;
            font-size: 11px;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .log-message {
            flex: 1;
            word-wrap: break-word;
        }

        .log-entry.log-info {
            background: #e3f2fd;
            color: #1976d2;
        }

        .log-entry.log-action {
            background: #fff3e0;
            color: #f57c00;
        }

        .log-entry.log-important {
            background: #ffebee;
            color: #c62828;
            font-weight: 600;
        }

        .log-entry.log-success {
            background: #e8f5e9;
            color: #2e7d32;
            font-weight: 600;
        }

        .log-entry.log-turn {
            background: #f3e5f5;
            color: #7b1fa2;
            font-weight: 600;
        }

        .log-entry.log-system {
            background: #eceff1;
            color: #455a64;
            font-weight: 600;
        }

        /* 猜测卡牌模态框 */
        .card-guess-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .card-guess-modal .modal-content {
            background: white;
            border-radius: 16px;
            padding: 30px;
            max-width: 500px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
        }

        .card-guess-modal h3 {
            margin-top: 0;
            margin-bottom: 20px;
            color: #333;
            text-align: center;
        }

        .card-guess-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
        }

        .guess-card-button {
            padding: 0;
            background: none;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            overflow: hidden;
        }

        .guess-card-button:focus-visible {
            outline: 3px solid #ffd700;
            outline-offset: 4px;
        }

        .guess-card-button .card-preview {
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .guess-card-button:hover .card-preview,
        .guess-card-button:focus-visible .card-preview {
            transform: translateY(-4px) scale(1.02);
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
        }

        .guess-card-button .card-overlay {
            padding: 10px 8px 12px;
        }

        .guess-card-button .card-overlay .card-name {
            font-size: 14px;
        }


        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 16px;
        }

        .modal-header h2 {
            margin: 0;
            color: #ffd700;
            font-size: 20px;
            text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
        }

        .modal-close-button {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: #ffd700;
            font-size: 24px;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            line-height: 1;
            padding: 0;
        }

        .modal-close-button:hover {
            background: rgba(255, 215, 0, 0.2);
            border-color: #ffd700;
            transform: rotate(90deg);
        }

        .modal-back-button {
            padding: 12px 28px;
            background: linear-gradient(135deg, #f0f4ff 0%, #d9e2ff 100%);
            color: #3b4a7a;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(59, 74, 122, 0.25);
        }

        .modal-back-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(59, 74, 122, 0.35);
        }

        .modal-back-button:active {
            transform: translateY(0);
        }

        /* 游戏结束模态框 */
        .game-end-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
        }

        /* 弃牌历史模态框 */
        .discard-history-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .discard-history-content {
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
            border-radius: 16px;
            padding: 24px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
            border: 2px solid rgba(255, 215, 0, 0.3);
        }

        .discard-history-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 16px;
        }

        .discard-history-item {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 12px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: all 0.3s ease;
        }

        .discard-history-item:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: translateX(4px);
        }

        .discard-history-card {
            width: 80px;
            height: 112px;
            background-size: cover;
            background-position: center;
            border-radius: 8px;
            border: 2px solid rgba(255, 215, 0, 0.5);
            position: relative;
            flex-shrink: 0;
        }

        .discard-history-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .discard-history-player {
            font-size: 16px;
            font-weight: 600;
            color: #ffd700;
            text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
        }

        .discard-history-card-name {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.8);
        }

        .discard-history-empty {
            text-align: center;
            padding: 40px;
            color: rgba(255, 255, 255, 0.6);
            font-size: 16px;
        }

        .game-end-modal .modal-content {
            background: white;
            border-radius: 16px;
            padding: 30px;
            max-width: 500px;
            width: 90%;
            text-align: center;
        }

        .game-end-modal h2 {
            color: #333;
            margin-bottom: 10px;
        }

        .game-end-modal h3 {
            color: #667eea;
            margin-bottom: 20px;
        }

        .final-hands {
            margin: 20px 0;
            text-align: left;
        }

        .final-hands h4 {
            margin-bottom: 10px;
            color: #333;
        }

        .final-hands ul {
            list-style: none;
            padding: 0;
        }

        .final-hands li {
            padding: 8px;
            background: #f8f9fa;
            margin-bottom: 5px;
            border-radius: 4px;
        }

        .modal-button {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .modal-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }
    </style>
</head>
<body>
    <div class="game-container">
        <div class="game-header">
            <h1>💌 情书 - Love Letter</h1>
        </div>
        
        <div class="game-table">
            <div id="game-message" class="message">等待游戏开始...</div>
            <div class="players-board" id="players-board"></div>
            <div class="deck-container" id="deck-container">
                <div class="deck-arrow" id="deck-arrow">⬇</div>
                <div class="deck" id="deck">
                    <div class="deck-count" id="deck-count">剩余0张牌</div>
                </div>
            </div>
            <div class="discard-container" id="discard-container">
                <div class="discard-arrow" id="discard-arrow">⬇</div>
                <div class="discard-label">弃牌堆</div>
                <div class="discard" id="discard">
                    <div class="discard-empty">暂无弃牌</div>
                </div>
            </div>
        </div>
        
        <div class="game-log-section">
            <div class="log-header">📜 游戏日志</div>
            <div id="game-log"></div>
        </div>
    </div>
    <script type="module" src="/js/main.js"></script>
</body>
</html>
